package com.practice2.exercise;

public class User {
    private String name;
    private int id;


    //setXxx()方法实现为属性赋值
    public void setName(String name) {
        this.name = name;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void show() {
//        System.out.println("name=" + name + ", id=" + id);
        System.out.println(name+":"+id);
    }
}
